export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'user'],
    routes: [
      // dashboard
      { path: '/', redirect: '/crowd/list' },

      {
        path: '/crowd',
        name: 'crowd',
        icon: 'table',
        routes: [
          {
            path: '/crowd/list',
            name: 'list',
            component: './Crowd/CrowdList',
          },
          {
            path: '/crowd/article',
            name: 'article',
            component: './Crowd/CrowdArticle',
          },
          {
            path: '/crowd/activity',
            name: 'activity',
            component: './Crowd/CrowdActivity',
          },
          {
            path: '/crowd/topic',
            name: 'topic',
            component: './Crowd/CrowdTopic',
          },
          {
            path: '/crowd/class',
            name: 'corwdClass',
            component: './Crowd/Class',
          },
        ],
      },
      {
        path: '/goods',
        name: 'goods',
        icon: 'shopping-cart',
        routes: [
          {
            path: '/goods/list',
            name: 'list',
            component: './Goods/GoodsList',
          },
          {
            path: '/goods/brand',
            name: 'brand',
            component: './Goods/Brand',
          },
          {
            path: '/goods/categories',
            name: 'categories',
            component: './Goods/Categories',
          },
        ],
      },
      {
        path: '/appuser',
        name: 'appuser',
        icon: 'user',
        routes: [
          {
            path: '/appuser/cert',
            name: 'cert',
            component: './AppUser/UserCert',
          },
          {
            path: '/appuser/with',
            name: 'with',
            component: './AppUser/UserWith',
          },
        ],
      },
      {
        path: '/admin',
        name: 'admin',
        icon: 'team',
        routes: [
          {
            path: '/admin/user',
            name: 'adminuser',
            component: './Admin/AdminUser',
          },
          {
            path: '/admin/role',
            name: 'adminrole',
            component: './Admin/AdminRole',
          },
          {
            path: '/admin/permission',
            name: 'adminpermission',
            component: './Admin/Permission',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
